Optimal. Leaf size=192 \[ -\frac {\left (b c d-2 b^2 e+6 a c e\right ) x}{c^2 \left (b^2-4 a c\right )}+\frac {x^2 \left (a (2 c d-b e)+\left (b c d-b^2 e+2 a c e\right ) x\right )}{c \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}+\frac {\left (b^3 c d-6 a b c^2 d-2 b^4 e+12 a b^2 c e-12 a^2 c^2 e\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c^3 \left (b^2-4 a c\right )^{3/2}}+\frac {(c d-2 b e) \log \left (a+b x+c x^2\right )}{2 c^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.21, antiderivative size = 192, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {832, 787, 648,
632, 212, 642} \begin {gather*} \frac {\left (-12 a^2 c^2 e+12 a b^2 c e-6 a b c^2 d-2 b^4 e+b^3 c d\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c^3 \left (b^2-4 a c\right )^{3/2}}-\frac {x \left (6 a c e-2 b^2 e+b c d\right )}{c^2 \left (b^2-4 a c\right )}+\frac {x^2 \left (x \left (2 a c e+b^2 (-e)+b c d\right )+a (2 c d-b e)\right )}{c \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}+\frac {(c d-2 b e) \log \left (a+b x+c x^2\right )}{2 c^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 632
Rule 642
Rule 648
Rule 787
Rule 832
Rubi steps
\begin {align*} \int \frac {x^3 (d+e x)}{\left (a+b x+c x^2\right )^2} \, dx &=\frac {x^2 \left (a (2 c d-b e)+\left (b c d-b^2 e+2 a c e\right ) x\right )}{c \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}+\frac {\int \frac {x \left (-2 a (2 c d-b e)-\left (b c d-2 b^2 e+6 a c e\right ) x\right )}{a+b x+c x^2} \, dx}{c \left (b^2-4 a c\right )}\\ &=-\frac {\left (b c d-2 b^2 e+6 a c e\right ) x}{c^2 \left (b^2-4 a c\right )}+\frac {x^2 \left (a (2 c d-b e)+\left (b c d-b^2 e+2 a c e\right ) x\right )}{c \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}+\frac {\int \frac {-a \left (-b c d+2 b^2 e-6 a c e\right )+\left (-2 a c (2 c d-b e)-b \left (-b c d+2 b^2 e-6 a c e\right )\right ) x}{a+b x+c x^2} \, dx}{c^2 \left (b^2-4 a c\right )}\\ &=-\frac {\left (b c d-2 b^2 e+6 a c e\right ) x}{c^2 \left (b^2-4 a c\right )}+\frac {x^2 \left (a (2 c d-b e)+\left (b c d-b^2 e+2 a c e\right ) x\right )}{c \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}+\frac {(c d-2 b e) \int \frac {b+2 c x}{a+b x+c x^2} \, dx}{2 c^3}-\frac {\left (b^3 c d-6 a b c^2 d-2 b^4 e+12 a b^2 c e-12 a^2 c^2 e\right ) \int \frac {1}{a+b x+c x^2} \, dx}{2 c^3 \left (b^2-4 a c\right )}\\ &=-\frac {\left (b c d-2 b^2 e+6 a c e\right ) x}{c^2 \left (b^2-4 a c\right )}+\frac {x^2 \left (a (2 c d-b e)+\left (b c d-b^2 e+2 a c e\right ) x\right )}{c \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}+\frac {(c d-2 b e) \log \left (a+b x+c x^2\right )}{2 c^3}+\frac {\left (b^3 c d-6 a b c^2 d-2 b^4 e+12 a b^2 c e-12 a^2 c^2 e\right ) \text {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{c^3 \left (b^2-4 a c\right )}\\ &=-\frac {\left (b c d-2 b^2 e+6 a c e\right ) x}{c^2 \left (b^2-4 a c\right )}+\frac {x^2 \left (a (2 c d-b e)+\left (b c d-b^2 e+2 a c e\right ) x\right )}{c \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )}+\frac {\left (b^3 c d-6 a b c^2 d-2 b^4 e+12 a b^2 c e-12 a^2 c^2 e\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c^3 \left (b^2-4 a c\right )^{3/2}}+\frac {(c d-2 b e) \log \left (a+b x+c x^2\right )}{2 c^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.20, size = 190, normalized size = 0.99 \begin {gather*} \frac {2 c e x+\frac {2 \left (b^3 (c d-b e) x+a^2 c (3 b e-2 c (d+e x))+a b \left (-b^2 e-3 c^2 d x+b c (d+4 e x)\right )\right )}{\left (b^2-4 a c\right ) (a+x (b+c x))}-\frac {2 \left (-b^3 c d+6 a b c^2 d+2 b^4 e-12 a b^2 c e+12 a^2 c^2 e\right ) \tan ^{-1}\left (\frac {b+2 c x}{\sqrt {-b^2+4 a c}}\right )}{\left (-b^2+4 a c\right )^{3/2}}+(c d-2 b e) \log (a+x (b+c x))}{2 c^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.83, size = 269, normalized size = 1.40
method | result | size |
default | \(\frac {e x}{c^{2}}-\frac {\frac {-\frac {\left (2 a^{2} c^{2} e -4 a \,b^{2} c e +3 a b \,c^{2} d +b^{4} e -b^{3} d c \right ) x}{c \left (4 a c -b^{2}\right )}+\frac {a \left (3 a b c e -2 a \,c^{2} d -e \,b^{3}+b^{2} c d \right )}{c \left (4 a c -b^{2}\right )}}{c \,x^{2}+b x +a}+\frac {\frac {\left (8 a b c e -4 a \,c^{2} d -2 e \,b^{3}+b^{2} c d \right ) \ln \left (c \,x^{2}+b x +a \right )}{2 c}+\frac {2 \left (6 a^{2} c e -2 a \,b^{2} e +a b c d -\frac {\left (8 a b c e -4 a \,c^{2} d -2 e \,b^{3}+b^{2} c d \right ) b}{2 c}\right ) \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}}{4 a c -b^{2}}}{c^{2}}\) | \(269\) |
risch | \(\text {Expression too large to display}\) | \(3047\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 622 vs.
\(2 (195) = 390\).
time = 1.14, size = 1263, normalized size = 6.58 \begin {gather*} \left [\frac {2 \, {\left (b^{5} c - 7 \, a b^{3} c^{2} + 12 \, a^{2} b c^{3}\right )} d x + {\left ({\left (b^{3} c^{2} - 6 \, a b c^{3}\right )} d x^{2} + {\left (b^{4} c - 6 \, a b^{2} c^{2}\right )} d x + {\left (a b^{3} c - 6 \, a^{2} b c^{2}\right )} d - 2 \, {\left (a b^{4} - 6 \, a^{2} b^{2} c + 6 \, a^{3} c^{2} + {\left (b^{4} c - 6 \, a b^{2} c^{2} + 6 \, a^{2} c^{3}\right )} x^{2} + {\left (b^{5} - 6 \, a b^{3} c + 6 \, a^{2} b c^{2}\right )} x\right )} e\right )} \sqrt {b^{2} - 4 \, a c} \log \left (\frac {2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c + \sqrt {b^{2} - 4 \, a c} {\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right ) + 2 \, {\left (a b^{4} c - 6 \, a^{2} b^{2} c^{2} + 8 \, a^{3} c^{3}\right )} d - 2 \, {\left (a b^{5} - 7 \, a^{2} b^{3} c + 12 \, a^{3} b c^{2} - {\left (b^{4} c^{2} - 8 \, a b^{2} c^{3} + 16 \, a^{2} c^{4}\right )} x^{3} - {\left (b^{5} c - 8 \, a b^{3} c^{2} + 16 \, a^{2} b c^{3}\right )} x^{2} + {\left (b^{6} - 9 \, a b^{4} c + 26 \, a^{2} b^{2} c^{2} - 24 \, a^{3} c^{3}\right )} x\right )} e + {\left ({\left (b^{4} c^{2} - 8 \, a b^{2} c^{3} + 16 \, a^{2} c^{4}\right )} d x^{2} + {\left (b^{5} c - 8 \, a b^{3} c^{2} + 16 \, a^{2} b c^{3}\right )} d x + {\left (a b^{4} c - 8 \, a^{2} b^{2} c^{2} + 16 \, a^{3} c^{3}\right )} d - 2 \, {\left (a b^{5} - 8 \, a^{2} b^{3} c + 16 \, a^{3} b c^{2} + {\left (b^{5} c - 8 \, a b^{3} c^{2} + 16 \, a^{2} b c^{3}\right )} x^{2} + {\left (b^{6} - 8 \, a b^{4} c + 16 \, a^{2} b^{2} c^{2}\right )} x\right )} e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, {\left (a b^{4} c^{3} - 8 \, a^{2} b^{2} c^{4} + 16 \, a^{3} c^{5} + {\left (b^{4} c^{4} - 8 \, a b^{2} c^{5} + 16 \, a^{2} c^{6}\right )} x^{2} + {\left (b^{5} c^{3} - 8 \, a b^{3} c^{4} + 16 \, a^{2} b c^{5}\right )} x\right )}}, \frac {2 \, {\left (b^{5} c - 7 \, a b^{3} c^{2} + 12 \, a^{2} b c^{3}\right )} d x + 2 \, {\left ({\left (b^{3} c^{2} - 6 \, a b c^{3}\right )} d x^{2} + {\left (b^{4} c - 6 \, a b^{2} c^{2}\right )} d x + {\left (a b^{3} c - 6 \, a^{2} b c^{2}\right )} d - 2 \, {\left (a b^{4} - 6 \, a^{2} b^{2} c + 6 \, a^{3} c^{2} + {\left (b^{4} c - 6 \, a b^{2} c^{2} + 6 \, a^{2} c^{3}\right )} x^{2} + {\left (b^{5} - 6 \, a b^{3} c + 6 \, a^{2} b c^{2}\right )} x\right )} e\right )} \sqrt {-b^{2} + 4 \, a c} \arctan \left (-\frac {\sqrt {-b^{2} + 4 \, a c} {\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) + 2 \, {\left (a b^{4} c - 6 \, a^{2} b^{2} c^{2} + 8 \, a^{3} c^{3}\right )} d - 2 \, {\left (a b^{5} - 7 \, a^{2} b^{3} c + 12 \, a^{3} b c^{2} - {\left (b^{4} c^{2} - 8 \, a b^{2} c^{3} + 16 \, a^{2} c^{4}\right )} x^{3} - {\left (b^{5} c - 8 \, a b^{3} c^{2} + 16 \, a^{2} b c^{3}\right )} x^{2} + {\left (b^{6} - 9 \, a b^{4} c + 26 \, a^{2} b^{2} c^{2} - 24 \, a^{3} c^{3}\right )} x\right )} e + {\left ({\left (b^{4} c^{2} - 8 \, a b^{2} c^{3} + 16 \, a^{2} c^{4}\right )} d x^{2} + {\left (b^{5} c - 8 \, a b^{3} c^{2} + 16 \, a^{2} b c^{3}\right )} d x + {\left (a b^{4} c - 8 \, a^{2} b^{2} c^{2} + 16 \, a^{3} c^{3}\right )} d - 2 \, {\left (a b^{5} - 8 \, a^{2} b^{3} c + 16 \, a^{3} b c^{2} + {\left (b^{5} c - 8 \, a b^{3} c^{2} + 16 \, a^{2} b c^{3}\right )} x^{2} + {\left (b^{6} - 8 \, a b^{4} c + 16 \, a^{2} b^{2} c^{2}\right )} x\right )} e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, {\left (a b^{4} c^{3} - 8 \, a^{2} b^{2} c^{4} + 16 \, a^{3} c^{5} + {\left (b^{4} c^{4} - 8 \, a b^{2} c^{5} + 16 \, a^{2} c^{6}\right )} x^{2} + {\left (b^{5} c^{3} - 8 \, a b^{3} c^{4} + 16 \, a^{2} b c^{5}\right )} x\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 1248 vs.
\(2 (187) = 374\).
time = 3.18, size = 1248, normalized size = 6.50 \begin {gather*} \left (- \frac {\sqrt {- \left (4 a c - b^{2}\right )^{3}} \cdot \left (12 a^{2} c^{2} e - 12 a b^{2} c e + 6 a b c^{2} d + 2 b^{4} e - b^{3} c d\right )}{2 c^{3} \cdot \left (64 a^{3} c^{3} - 48 a^{2} b^{2} c^{2} + 12 a b^{4} c - b^{6}\right )} - \frac {2 b e - c d}{2 c^{3}}\right ) \log {\left (x + \frac {- 10 a^{2} b c e - 16 a^{2} c^{4} \left (- \frac {\sqrt {- \left (4 a c - b^{2}\right )^{3}} \cdot \left (12 a^{2} c^{2} e - 12 a b^{2} c e + 6 a b c^{2} d + 2 b^{4} e - b^{3} c d\right )}{2 c^{3} \cdot \left (64 a^{3} c^{3} - 48 a^{2} b^{2} c^{2} + 12 a b^{4} c - b^{6}\right )} - \frac {2 b e - c d}{2 c^{3}}\right ) + 8 a^{2} c^{2} d + 2 a b^{3} e + 8 a b^{2} c^{3} \left (- \frac {\sqrt {- \left (4 a c - b^{2}\right )^{3}} \cdot \left (12 a^{2} c^{2} e - 12 a b^{2} c e + 6 a b c^{2} d + 2 b^{4} e - b^{3} c d\right )}{2 c^{3} \cdot \left (64 a^{3} c^{3} - 48 a^{2} b^{2} c^{2} + 12 a b^{4} c - b^{6}\right )} - \frac {2 b e - c d}{2 c^{3}}\right ) - a b^{2} c d - b^{4} c^{2} \left (- \frac {\sqrt {- \left (4 a c - b^{2}\right )^{3}} \cdot \left (12 a^{2} c^{2} e - 12 a b^{2} c e + 6 a b c^{2} d + 2 b^{4} e - b^{3} c d\right )}{2 c^{3} \cdot \left (64 a^{3} c^{3} - 48 a^{2} b^{2} c^{2} + 12 a b^{4} c - b^{6}\right )} - \frac {2 b e - c d}{2 c^{3}}\right )}{12 a^{2} c^{2} e - 12 a b^{2} c e + 6 a b c^{2} d + 2 b^{4} e - b^{3} c d} \right )} + \left (\frac {\sqrt {- \left (4 a c - b^{2}\right )^{3}} \cdot \left (12 a^{2} c^{2} e - 12 a b^{2} c e + 6 a b c^{2} d + 2 b^{4} e - b^{3} c d\right )}{2 c^{3} \cdot \left (64 a^{3} c^{3} - 48 a^{2} b^{2} c^{2} + 12 a b^{4} c - b^{6}\right )} - \frac {2 b e - c d}{2 c^{3}}\right ) \log {\left (x + \frac {- 10 a^{2} b c e - 16 a^{2} c^{4} \left (\frac {\sqrt {- \left (4 a c - b^{2}\right )^{3}} \cdot \left (12 a^{2} c^{2} e - 12 a b^{2} c e + 6 a b c^{2} d + 2 b^{4} e - b^{3} c d\right )}{2 c^{3} \cdot \left (64 a^{3} c^{3} - 48 a^{2} b^{2} c^{2} + 12 a b^{4} c - b^{6}\right )} - \frac {2 b e - c d}{2 c^{3}}\right ) + 8 a^{2} c^{2} d + 2 a b^{3} e + 8 a b^{2} c^{3} \left (\frac {\sqrt {- \left (4 a c - b^{2}\right )^{3}} \cdot \left (12 a^{2} c^{2} e - 12 a b^{2} c e + 6 a b c^{2} d + 2 b^{4} e - b^{3} c d\right )}{2 c^{3} \cdot \left (64 a^{3} c^{3} - 48 a^{2} b^{2} c^{2} + 12 a b^{4} c - b^{6}\right )} - \frac {2 b e - c d}{2 c^{3}}\right ) - a b^{2} c d - b^{4} c^{2} \left (\frac {\sqrt {- \left (4 a c - b^{2}\right )^{3}} \cdot \left (12 a^{2} c^{2} e - 12 a b^{2} c e + 6 a b c^{2} d + 2 b^{4} e - b^{3} c d\right )}{2 c^{3} \cdot \left (64 a^{3} c^{3} - 48 a^{2} b^{2} c^{2} + 12 a b^{4} c - b^{6}\right )} - \frac {2 b e - c d}{2 c^{3}}\right )}{12 a^{2} c^{2} e - 12 a b^{2} c e + 6 a b c^{2} d + 2 b^{4} e - b^{3} c d} \right )} + \frac {- 3 a^{2} b c e + 2 a^{2} c^{2} d + a b^{3} e - a b^{2} c d + x \left (2 a^{2} c^{2} e - 4 a b^{2} c e + 3 a b c^{2} d + b^{4} e - b^{3} c d\right )}{4 a^{2} c^{4} - a b^{2} c^{3} + x^{2} \cdot \left (4 a c^{5} - b^{2} c^{4}\right ) + x \left (4 a b c^{4} - b^{3} c^{3}\right )} + \frac {e x}{c^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.88, size = 235, normalized size = 1.22 \begin {gather*} -\frac {{\left (b^{3} c d - 6 \, a b c^{2} d - 2 \, b^{4} e + 12 \, a b^{2} c e - 12 \, a^{2} c^{2} e\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{{\left (b^{2} c^{3} - 4 \, a c^{4}\right )} \sqrt {-b^{2} + 4 \, a c}} + \frac {x e}{c^{2}} + \frac {{\left (c d - 2 \, b e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, c^{3}} + \frac {\frac {{\left (b^{3} c d - 3 \, a b c^{2} d - b^{4} e + 4 \, a b^{2} c e - 2 \, a^{2} c^{2} e\right )} x}{c} + \frac {a b^{2} c d - 2 \, a^{2} c^{2} d - a b^{3} e + 3 \, a^{2} b c e}{c}}{{\left (c x^{2} + b x + a\right )} {\left (b^{2} - 4 \, a c\right )} c^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.85, size = 360, normalized size = 1.88 \begin {gather*} \frac {\frac {a\,\left (e\,b^3-d\,b^2\,c-3\,a\,e\,b\,c+2\,a\,d\,c^2\right )}{c\,\left (4\,a\,c-b^2\right )}+\frac {x\,\left (2\,e\,a^2\,c^2-4\,e\,a\,b^2\,c+3\,d\,a\,b\,c^2+e\,b^4-d\,b^3\,c\right )}{c\,\left (4\,a\,c-b^2\right )}}{c^3\,x^2+b\,c^2\,x+a\,c^2}+\frac {\ln \left (c\,x^2+b\,x+a\right )\,\left (-128\,e\,a^3\,b\,c^3+64\,d\,a^3\,c^4+96\,e\,a^2\,b^3\,c^2-48\,d\,a^2\,b^2\,c^3-24\,e\,a\,b^5\,c+12\,d\,a\,b^4\,c^2+2\,e\,b^7-d\,b^6\,c\right )}{2\,\left (64\,a^3\,c^6-48\,a^2\,b^2\,c^5+12\,a\,b^4\,c^4-b^6\,c^3\right )}+\frac {e\,x}{c^2}-\frac {\mathrm {atan}\left (\frac {2\,c\,x}{\sqrt {4\,a\,c-b^2}}-\frac {b^3\,c^2-4\,a\,b\,c^3}{c^2\,{\left (4\,a\,c-b^2\right )}^{3/2}}\right )\,\left (12\,e\,a^2\,c^2-12\,e\,a\,b^2\,c+6\,d\,a\,b\,c^2+2\,e\,b^4-d\,b^3\,c\right )}{c^3\,{\left (4\,a\,c-b^2\right )}^{3/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________